﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using AffinityORMLibrary.DataTypes;
using AffinityORMLibrary.DataLayer.Utility;

namespace AffinityORMLibrary.DataLayer.Action
{
    class GetSysTableColumns : ISelectionAction
    {
        public DbCommand Select(DbProviderFactory factory, DataBase domain)
        {
            DbCommand command = factory.CreateCommand();
            command.CommandText = "SELECT * FROM INFORMATION_SCHEMA.COLUMNS " + SQLHelper.CreateWhereClause(domain);
            return command;
        }
    }
}
